package com.example.demo.producer.task;

import com.example.demo.producer.domain.DeferredResultHolder;

/**
 * @Auther Created by l.wang on 2019/4/5.
 */
public class RemoveCache implements Runnable {

    private DeferredResultHolder deferredResultHolder;
    private String code;

    public RemoveCache(DeferredResultHolder deferredResultHolder, String code) {
        this.deferredResultHolder = deferredResultHolder;
        this.code = code;
    }

    @Override
    public void run() {
        deferredResultHolder.getMap().remove(code);
    }
}
